package com.jboa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.jboa.dao.ILeaveDAO;
import com.jboa.service.ILeaveService;
import com.jboa.vo.BizLeave;
import com.jboa.vo.PageHelper;
@Service("LeaveService")
public class LeaveServiceImpl implements ILeaveService {
	@Autowired
	@Qualifier("Leavedao")
	private ILeaveDAO leaveDao;
	
	//请假申请
	public boolean addLeave(BizLeave leave) {
		leaveDao.AddLeave(leave);
		if(leave.getId()!=null){
			return true;
		}
		return false;
	}

	//获取申请列表
	public void getByPage(PageHelper page) {
		leaveDao.getByPage(page);
	}

	//根据id获取请假单详情
	public BizLeave getByid(Long id) {
		return leaveDao.getByid(id);
	}

}
